<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var obj = new Object(); //创建了一个空的对象
        obj.uname = "jake";
        obj.age = 18;
        obj.sex = "男";
        obj.sayhi = function() {
                console.log("hi");
            }
            //利用等号赋值的方法
        console.log(obj.age);
        console.log(obj["sex"]);
        console.log(obj);

        // var people = new Object();
        // people.name = "邻人";
        // people.sex = "nan";
        // people.age = 18;
        // people.skill = function() {
        //     console.log("影分身");
        // }
        // console.log(people.age);
        // console.log(people.name);
        // console.log(people["sex"]);
        // people.skill();
    </script>
</head>

<body>

</body>

</html>